#include "BowNode.h"

BowNode* BowNode::createBowNode(Bow *bow) {
	BowNode *bowNode = new BowNode();
	if (bowNode && bowNode->initBowNode(bow)) {
		bowNode->autorelease();
		return bowNode;
	}
	CC_SAFE_DELETE(bowNode);
	return nullptr;
}

bool BowNode::initBowNode(Bow *bow) {
	m_showSprite = Sprite::createWithSpriteFrameName(bow->getBowFileName());
	this->addChild(m_showSprite);
	m_bow = bow;
	return true;
}

int BowNode::getPower() {
	return m_bow->getPower();
}

int BowNode::getSpeed() {
	return m_bow->getSpeed();
}

int BowNode::getMultArrow() {
	return m_bow->getMultArrow();
}

void BowNode::setPower(int power) {
	m_bow->setPower(power);
}

void BowNode::setSpeed(int speed) {
	m_bow->setSpeed(speed);
}

void BowNode::setMultArrow(int multArrow) {
	m_bow->setMultArrow(multArrow);
}